package MapHomeWork.fifth;

import java.util.Objects;

public class Student {
    private  int sId;
    private  String sName;
    private  int age;

    public Student() {

    }

    public Student(int sId, String sName, int age) {
        this.sId = sId;
        this.sName = sName;
        this.age = age;
    }

    public int getsId() {
        return sId;
    }

    public void setsId(int sId) {
        this.sId = sId;
    }

    public String getsName() {
        return sName;
    }

    public void setsName(String sName) {
        this.sName = sName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return sId == student.sId &&
                Objects.equals(sName, student.sName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sId, sName);
    }
}
